<template>
  <div class="myStar">
    <div class="header items-center bg-white sticky">
      <u-tabs :list="types" @click="changeType"></u-tabs>
      <view class="manage" @tap="setManage">{{
        isManage ? "完成" : "管理"
      }}</view>
    </div>
    <div class="content">
      <!-- <GoodsList v-show="currentType === 1" ref="goodsList"/>
      <StoreList v-show="currentType === 2" ref="storeList"/> -->
      <view class="noStar">
        <u-empty mode="favor" icon="../../static/icones/noStar.png"> </u-empty>
      </view>
    </div>
  </div>
</template>

<script>
import GoodsList from "./components/goodsList";
import StoreList from "./components/storeList";
export default {
  components: { GoodsList, StoreList },
  data() {
    return {
      currentType: 1,
      types: [
        { name: "商品", value: 1 },
        { name: "店铺", value: 2 },
      ],
      isManage: false,
    };
  },
  computed: {},
  mounted() {},
  // onPullDownRefresh() {
  //   if (this.currentType === 1) {
  //     this.$refs.goodsList.resetData();
  //   } else {
  //     this.$refs.storeList.resetData();
  //   }
  // },
  // onReachBottom() {
  //   if (this.currentType === 1) {
  //     this.$refs.goodsList.getMoreData();
  //   } else {
  //     this.$refs.storeList.getMoreData();
  //   }
  // },
  methods: {
    changeType(val) {
      console.log(val, "value");
    },
    setManage() {
      this.isManage = !this.isManage;
    },
  },
};
</script>
<style lang="scss">
.myStar {
  width: 100vw;
  height: 100vh;
  // margin-top: 2px;
  position: relative;
  .header {
    // position: fixed;
    // top: 0;
    // left: 0;
    width: 100%;
    height: 44px;
    padding: 0 16px;
    background: #ffffff;
    border-bottom: 1px solid #e4e4e4;
    .manage {
      width: 70px;
      height: 44px;
      line-height: 44px;
      text-align: center;
      color: #3d3d3d;
      font-size: 15px;
      margin-left: auto;
      transition: all 0.3s;
    }
  }
  .content {
    width: 100%;
    .noStar {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }
  }
}
</style>
